package com.javandad.app.client.fodos;

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.AbsolutePanel;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.Image;

public class ShowFodoDialogBox extends DialogBox {

	/**
	 * @wbp.parser.constructor
	 */
	public ShowFodoDialogBox(String url, final FodosNode parent) {
		super();
	    this.setModal(false);
	    this.setAutoHideEnabled(true);
	    this.setSize("800px", "700px");
	    
	    AbsolutePanel absolutePanel = new AbsolutePanel();
	    setWidget(absolutePanel);
	    absolutePanel.setSize("800px", "700px");
	    
	    Image image = new Image(url);
	    absolutePanel.add(image, 0, 0);
	    image.setSize("800px", "600px");
	    
	    Button btnSetAsProfile = new Button("Set as profile fodo");
	    btnSetAsProfile.addClickHandler(new ClickHandler() {
	    	public void onClick(ClickEvent event) {
	    		parent.setAsProfileFodo();
	    	}
	    });
	    absolutePanel.add(btnSetAsProfile, 10, 664);
	}
}
